Show File - Download a file through the browser

This action causes the browser to download a file, invoking the appropriate viewer/editor as defined by the browser and/or operating system preferences.

Triggers

The action's template has no triggers, but in most cases you will add at least one.

Internal Modeling

It is your responsibility to model whatever is needed to produce the file to be handled. Any complexity of modeling is possible, as long as the <File> exit is charged with a File data structure.

Make sure you properly set values to each of the three components of the output File data structure:

Exits

<File> (non-repetitive exit [required]): The file to be handled (a File data structure).

Upon completion of the action, the file sent out through this exit is downloaded used when invoking the relevant viewer/editor.

Notes

  1. Show File is always used in a client context (Show File is a display action, so it cannot be used within a service), but anything you model inside Show File runs on the server side. If you need access to client-side data (like the content of a field on the screen), pass it to Show File through triggers.
  2. Passing a File data structure or its binary Content field through a trigger will not work, since the client cannot handle binary data (the only exception to this rule is passing a File Input Field's <Value> element directly through a trigger).
  3. When executed successfully, Show File invokes a viewer/editor for the created file, but no file exits through the <File> exit, nor will any other exit be activated.

Suggested Usage

Use this action to display or save an Excel file generated by Update Excel Table or Update Excel Text, or a PDF file generated by Create PDF.

Usage Examples 1

"Examples/File Library/File Library View/Show File" in the "Examples" project:

Usage Examples 2

"Examples/Documents/Images/Show File" in the "Examples" project: